﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="add.aspx.cs" Inherits="Forum.Web.Admin.Company.hr.add" %>

<%@ Register Assembly="Public.Control" Namespace="Public.Control" TagPrefix="cc11" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../../styles/dntmanager.css" rel="stylesheet" type="text/css" />
    <link href="../../styles/modelpopup.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    	.list_tu
    	{
    		height: 120px;
    		width: 120px;
    		float: left;
    		display: block;
    		margin-right: 15px;
    		margin-top: 15px;
    		border: 1px solid #729FD8;
    	}
    	.apDiv1
    	{
    		position: static;
    		height: 20px;
    		z-index: 1;
    		margin-top: -20px;
    	}
    	.apDiv1 div
    	{
    		background-color: #B3CBEA;
    		height: 20px;
    		text-align: center;
    		line-height: 20px;
    		cursor: pointer;
    		float: left;
    		width: 120px;
    	}
    	#jiatu_
    	{
    		float: left;
    		margin-top: 15px;
    		padding-top: 60px;
    	}
    	#jiatu_ img
    	{
    		cursor: pointer;
    	}
    	.list_tu img
    	{
    		height: 100px;
    		width: 120px;
    	}
    	.list_tu div
    	{
    		background-color: #FFFFFF;
    		line-height: 20px;
    		height: 20px;
    		width: 120px;
    	}
    	.list_tu span
    	{
    		cursor: pointer;
    	}
    	.list_tu span:hover
    	{
    		color: #FF0000;
    	}
    </style>
</head>
<script src="../../js/common.js" type="text/javascript"></script>
<script src="../../js/modalpopup.js" type="text/javascript"></script>
<body class="ContentBody">
    <form id="form2" runat="server">
    <asp:TextBox ID="TextBox1" runat="server" Width="672px" Style="display: none;"></asp:TextBox>
    <cc11:Hint ID="Hint1" runat="server" HintImageUrl="../../images" />
    <div class="ManagerForm">
        <fieldset>
            <legend style="background: url(../../images/icons/icon30.jpg) no-repeat 6px 50%;">添加/修改招聘信息</legend>
            <div class="MainDiv">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" style="width: 100%;
                    padding-right: 5px;">
                    <tr>
                        <td height="40" align="right" style="padding-right: 5px">
                            职位名称:
                        </td>
                        <td>
                            &nbsp;<cc11:TextBox ID="f_zwmc" HintInfo="英文汉字均可,必填" 
								runat="server" Width="210px"></cc11:TextBox>
                            <span style="display: none;">
                                <input id="Text2" style="width: 12px" type="text" /></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="40" align="right" style="padding-right: 5px; width: 100px">
                            职位代码:
                        </td>
                        <td>
                            &nbsp;<cc11:TextBox 
								ID="f_zwdm" HintInfo="作为自定义分类,选填" 
								runat="server" Width="100px"></cc11:TextBox>
                            &nbsp;(如：00001)</td>
                    </tr>
                    <tr>
                        <td height="40" align="right">
                            职位要求:
                        </td>
                        <td height="50" style="padding: 5px">
                            <cc11:TextBox ID="f_zwyq" HintInfo="对职位要求的说明,必填" runat="server" Width="400px"
                                Height="100px" TextMode="MultiLine">1、
2、
3、
4、
5、
6、</cc11:TextBox>
                        </td>
                    </tr>
                    <tr id="yc_0">
                        <td height="40" align="right">
                            招聘人数:
                        </td>
                        <td height="50" style="padding: 5px">
                            <cc11:TextBox ID="f_zprs" HintInfo="招聘人数,必填"
                                runat="server" Width="100px" HintShowType="up"></cc11:TextBox>
                            &nbsp;人</td>
                    </tr>
                    <tr>
                        <td height="40" align="right">
                            到期日期:
                        </td>
                        <td height="50">
                            &nbsp;<cc11:TextBox ID="f_dqrq" HintInfo="招聘信息过期时间,选填"
                                runat="server" Width="130px" HintShowType="up"></cc11:TextBox>
                        &nbsp;(如：2011-10-01)</td>
                    </tr>
                    <tr>
                        <td height="40" align="right">
                            招聘地点:
                        </td>
                        <td height="50">
                            &nbsp;<cc11:TextBox ID="f_zpdd" HintInfo="招聘职位所在地"
                                runat="server" Width="130px" HintShowType="up"></cc11:TextBox>
                            &nbsp;
                        	(如：上海)</td>
                    </tr>
                    <tr id="z_fl">
                        <td height="40" align="right">
                            其它选项:
                        </td>
                        <td height="50">
                            &nbsp;
                            <input id="f_shenhe" type="checkbox" runat="server" /><label for="f_shenhe">立即发布</label><span
                                style="color: Red;">（否则审核后才能显示在前台页面上）</span>
                        </td>
                    </tr>
                </table>
                <script src="../../js/jquery/jquery.js" type="text/javascript"></script>
                <script type="text/javascript">
var id=<%=id %>;



function onsub_()
{
    var f_zwmc=$("#f_zwmc");
    var f_zwdm=$("#f_zwdm");
	var f_zwyq=$("#f_zwyq");
	var f_zprs=$("#f_zprs");
    var f_dqrq=$("#f_dqrq");
    var f_sh=$("#f_shenhe");
	var f_zpdd=$("#f_zpdd");

    if($.trim(f_zwmc.val())=="")
    {
        alert("职位名称不能为空");
        f_zwmc.focus();
        return;
    }
    if($.trim(f_zwyq.val())=="")
    {
        alert("职位要求不能为空");
        f_zwyq.focus();
        return;
    }
    if($.trim(f_zprs.val())=="")
    {
        alert("招聘人数不能为空");
        f_zprs.focus();
        return;
    }
    if($.trim(f_dqrq.val())=="")
    {
        alert("到期日期不能为空");
        f_dqrq.focus();
        return;
    }

	Forum.Web.Admin.Company.hr.add.AddData(id, f_zwmc.val(), f_zwdm.val(), f_zprs.val(), (f_sh.attr("checked")?1:0), f_dqrq.val(), f_zwyq.val() ,f_zpdd.val(),function (res){
        if(res!=null && res.value!="0")
        {
            if(id!=0)
            {
                alert("更新成功");
            }
            else
            {
                var msg=confirm("添加成功,是否继续添加");
                if(msg)
                {
                    window.location.reload();
                }
                else{
                    window.location="list.aspx";
                }
            }
        }
     });

}


$(function(){
    $("#Button4").click(function(){
		onsub_();
    });
});

                </script>
            </div>
        </fieldset>
        <div class="Navbutton">
            <span id='sp3'>
                <cc11:Button ID="Button4" runat="server" AutoPostBack="False" ButtonImgUrl="../../images/check_1.gif"
                    Text=" 保存内容" ValidateForm="False" /></span> <span id='sp4' style="display: none;">
                        <cc11:Button ID="Button5" runat="server" AutoPostBack="False" ButtonImgUrl="../../images/check_1.gif"
                            Text=" 保存内容" ValidateForm="False" ScriptContent="return Button2_onclick()" />
                    </span><span id='sp5'>&nbsp;
                        <cc11:Button ID="Button6" runat="server" AutoPostBack="False" ButtonImgUrl="../../images/cache_reset.gif"
                            Text=" 取  消" ValidateForm="False" ScriptContent="history.go(-1);" /></span>
        </div>
    </div>
    </form>
</body>
</html>
